<%@ page import="com.informet.ipd.modelo.dao.ProgEstrDao" %>
<%@ page import="com.informet.ipd.modelo.vo.UbigeoVO" %>
<%@ page import="com.informet.ipd.struts.form.ProgEstrForm" %>
<%@ page import="java.util.*" %>
<%@ page import="javax.swing.JOptionPane"%>
<%@ page language="java"  pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %>
<%@ taglib uri="/tags/c" prefix="c"%>

<%


            StringBuffer cadenaSalida = new StringBuffer();
            List lista = null;


            ProgEstrDao supportFacade = new ProgEstrDao();
            ProgEstrForm form = new ProgEstrForm();

            try {

                String  id = request.getParameter("id");

                // JOptionPane.showMessageDialog(null, "tipo : "+ tipo);

                UbigeoVO vo;
                lista = supportFacade.getComboDistrito(id);
                form.setListDistrito(lista);

                cadenaSalida.append("<select  name='codProvincia' id='codDistrito' >");
                cadenaSalida.append(" <option value='-1'>[--Seleccionar Distrito--]</option>");
                Iterator it = lista.iterator();
                while (it.hasNext()) {
                    vo = (UbigeoVO) it.next();


                    cadenaSalida.append("<option value='"+vo.getNUM_CODDIST_PK()+"'>"+vo.getTX_NOMDIST()+"</option>");



                }
                 cadenaSalida.append("</select>");
            } catch (Exception e) {
                   cadenaSalida.append("error : "+e.toString());
            }
            out.print(cadenaSalida);
%>